package com.yunhe.spring.servlet;

import com.yunhe.spring.entity.User;
import com.yunhe.spring.service.UserService;
import com.yunhe.spring.service.impl.UserServiceImpl;

public class UserServlet {
   private UserService userService;

    /**
     * 设置函数
     * @param userService
     */
    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    public void save(){
               User user = new User();
               user.setName("yuxiangy");
               userService.save(user);
           }
}
